package com.jokelandave.poc.server.restlet;

import org.restlet.Request;
import org.restlet.Response;
import org.restlet.Restlet;
import org.restlet.data.MediaType;

public class RequestInfo extends Restlet {
	
	public void handle(Request request, Response response)
	{
		String entity = "Method: "+ request.getMethod()
				+ "\nResource URI: "+ request.getResourceRef()
				+ "\nIP address: "+ request.getClientInfo().getAddress()
				+ "\nAgent name: "+ request.getClientInfo().getAddress()
				+ "\nAgent version: "+ request.getClientInfo().getAgentVersion();
		response.setEntity(entity, MediaType.TEXT_PLAIN);
				
	}

}
